<?
if(!ADMIN) common::accessdenied();
if(POST){
    switch (PARAMS){
        default: if($_POST['ID']) account::edit($_POST); else account::create($_POST); break;
        case 'access': account::set($_POST); break;
        case 'delete': account::del($_POST); break;
    }
} else {
    if(PARAMS) $data->account = account::get(array('ID'=>PARAMS));
    $data->TITLE = PARAMS?_('Edit Account'):_('New Account');
    $data->DESCRIPTION = PARAMS?_('Edit the account'):_('Create a new account');
    $data->CSS = 'home';
}
?>